<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: fabgl::CanvasClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_canvas_class.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classfabgl_1_1_canvas_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">fabgl::CanvasClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A class with a set of drawing methods.  
 <a href="classfabgl_1_1_canvas_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="canvas_8h_source.html">canvas.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a37beec4d52526d2710d47d911a1cd8c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a37beec4d52526d2710d47d911a1cd8c2">clear</a> ()</td></tr>
<tr class="memdesc:a37beec4d52526d2710d47d911a1cd8c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the entire canvas with the brush color.  <a href="#a37beec4d52526d2710d47d911a1cd8c2">More...</a><br /></td></tr>
<tr class="separator:a37beec4d52526d2710d47d911a1cd8c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa68c2ce56287c24807735d8581896ae6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aa68c2ce56287c24807735d8581896ae6">copyRect</a> (int sourceX, int sourceY, int destX, int destY, int width, int height)</td></tr>
<tr class="memdesc:aa68c2ce56287c24807735d8581896ae6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies a screen rectangle to the specified position.  <a href="#aa68c2ce56287c24807735d8581896ae6">More...</a><br /></td></tr>
<tr class="separator:aa68c2ce56287c24807735d8581896ae6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a087f09897a081655285878a7990897fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a087f09897a081655285878a7990897fa">drawBitmap</a> (int X, int Y, <a class="el" href="structfabgl_1_1_bitmap.html">Bitmap</a> const *bitmap)</td></tr>
<tr class="memdesc:a087f09897a081655285878a7990897fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a bitmap at specified position.  <a href="#a087f09897a081655285878a7990897fa">More...</a><br /></td></tr>
<tr class="separator:a087f09897a081655285878a7990897fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c98e6b07d359ecb53ad42ce3b2dfc4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a5c98e6b07d359ecb53ad42ce3b2dfc4d">drawChar</a> (int X, int Y, char c)</td></tr>
<tr class="memdesc:a5c98e6b07d359ecb53ad42ce3b2dfc4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a character at specified position.  <a href="#a5c98e6b07d359ecb53ad42ce3b2dfc4d">More...</a><br /></td></tr>
<tr class="separator:a5c98e6b07d359ecb53ad42ce3b2dfc4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb55df87239430d3d88cd17ff10740b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aeb55df87239430d3d88cd17ff10740b3">drawEllipse</a> (int X, int Y, int width, int height)</td></tr>
<tr class="memdesc:aeb55df87239430d3d88cd17ff10740b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws an ellipse specifying center and size, using current pen color.  <a href="#aeb55df87239430d3d88cd17ff10740b3">More...</a><br /></td></tr>
<tr class="separator:aeb55df87239430d3d88cd17ff10740b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0358b5407c1158532728a9006d81e101"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a0358b5407c1158532728a9006d81e101">drawGlyph</a> (int X, int Y, int width, int height, uint8_t const *data, int index=0)</td></tr>
<tr class="memdesc:a0358b5407c1158532728a9006d81e101"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a glyph at specified position.  <a href="#a0358b5407c1158532728a9006d81e101">More...</a><br /></td></tr>
<tr class="separator:a0358b5407c1158532728a9006d81e101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdb202eb5ce3c1789a51f2d322ffe87d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#afdb202eb5ce3c1789a51f2d322ffe87d">drawLine</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:afdb202eb5ce3c1789a51f2d322ffe87d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a line specifying initial and ending coordinates.  <a href="#afdb202eb5ce3c1789a51f2d322ffe87d">More...</a><br /></td></tr>
<tr class="separator:afdb202eb5ce3c1789a51f2d322ffe87d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae571dee57606116e6866cd9d87431255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ae571dee57606116e6866cd9d87431255">drawPath</a> (<a class="el" href="structfabgl_1_1_point.html">Point</a> const *points, int pointsCount)</td></tr>
<tr class="memdesc:ae571dee57606116e6866cd9d87431255"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a sequence of lines.  <a href="#ae571dee57606116e6866cd9d87431255">More...</a><br /></td></tr>
<tr class="separator:ae571dee57606116e6866cd9d87431255"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3c576f40f28789d5b11e622e2c1021c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ae3c576f40f28789d5b11e622e2c1021c">drawRectangle</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:ae3c576f40f28789d5b11e622e2c1021c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a rectangle using the current pen color.  <a href="#ae3c576f40f28789d5b11e622e2c1021c">More...</a><br /></td></tr>
<tr class="separator:ae3c576f40f28789d5b11e622e2c1021c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8c5651bc5a45fbdccd484b1430f16c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aa8c5651bc5a45fbdccd484b1430f16c5">drawRectangle</a> (<a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;rect)</td></tr>
<tr class="memdesc:aa8c5651bc5a45fbdccd484b1430f16c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a rectangle using the current pen color.  <a href="#aa8c5651bc5a45fbdccd484b1430f16c5">More...</a><br /></td></tr>
<tr class="separator:aa8c5651bc5a45fbdccd484b1430f16c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e53c87e27387e1849e9439880d03e44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a7e53c87e27387e1849e9439880d03e44">drawText</a> (int X, int Y, char const *text, bool wrap=false)</td></tr>
<tr class="memdesc:a7e53c87e27387e1849e9439880d03e44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a string at specified position.  <a href="#a7e53c87e27387e1849e9439880d03e44">More...</a><br /></td></tr>
<tr class="separator:a7e53c87e27387e1849e9439880d03e44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a156b6cdb13bbd65d298805512d710197"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a156b6cdb13bbd65d298805512d710197">drawText</a> (FontInfo const *fontInfo, int X, int Y, char const *text, bool wrap=false)</td></tr>
<tr class="memdesc:a156b6cdb13bbd65d298805512d710197"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a string at specified position.  <a href="#a156b6cdb13bbd65d298805512d710197">More...</a><br /></td></tr>
<tr class="separator:a156b6cdb13bbd65d298805512d710197"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b0f278e677b6195ccea7bc377fe8c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a45b0f278e677b6195ccea7bc377fe8c5">drawTextFmt</a> (int X, int Y, const char *format,...)</td></tr>
<tr class="memdesc:a45b0f278e677b6195ccea7bc377fe8c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws formatted text at specified position.  <a href="#a45b0f278e677b6195ccea7bc377fe8c5">More...</a><br /></td></tr>
<tr class="separator:a45b0f278e677b6195ccea7bc377fe8c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46a911ad5ad3fee9a091e660939cb86c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a46a911ad5ad3fee9a091e660939cb86c">drawTextWithEllipsis</a> (FontInfo const *fontInfo, int X, int Y, char const *text, int maxX)</td></tr>
<tr class="memdesc:a46a911ad5ad3fee9a091e660939cb86c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a string at specified position. Add ellipses before truncation.  <a href="#a46a911ad5ad3fee9a091e660939cb86c">More...</a><br /></td></tr>
<tr class="separator:a46a911ad5ad3fee9a091e660939cb86c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeeaccac47e099a8b20fae352b9f6766b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aeeaccac47e099a8b20fae352b9f6766b">fillEllipse</a> (int X, int Y, int width, int height)</td></tr>
<tr class="memdesc:aeeaccac47e099a8b20fae352b9f6766b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills an ellipse specifying center and size, using current brush color.  <a href="#aeeaccac47e099a8b20fae352b9f6766b">More...</a><br /></td></tr>
<tr class="separator:aeeaccac47e099a8b20fae352b9f6766b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac74e3c84ed8ec93165b937a7188fca3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ac74e3c84ed8ec93165b937a7188fca3e">fillPath</a> (<a class="el" href="structfabgl_1_1_point.html">Point</a> const *points, int pointsCount)</td></tr>
<tr class="memdesc:ac74e3c84ed8ec93165b937a7188fca3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills the polygon enclosed in a sequence of lines.  <a href="#ac74e3c84ed8ec93165b937a7188fca3e">More...</a><br /></td></tr>
<tr class="separator:ac74e3c84ed8ec93165b937a7188fca3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a003aeb0b8e58b5e0e658e2f18c106fef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a003aeb0b8e58b5e0e658e2f18c106fef">fillRectangle</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:a003aeb0b8e58b5e0e658e2f18c106fef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a rectangle using the current brush color.  <a href="#a003aeb0b8e58b5e0e658e2f18c106fef">More...</a><br /></td></tr>
<tr class="separator:a003aeb0b8e58b5e0e658e2f18c106fef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aded7fc26c80df208a8926f58ecfe3485"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aded7fc26c80df208a8926f58ecfe3485">fillRectangle</a> (<a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;rect)</td></tr>
<tr class="memdesc:aded7fc26c80df208a8926f58ecfe3485"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a rectangle using the current brush color.  <a href="#aded7fc26c80df208a8926f58ecfe3485">More...</a><br /></td></tr>
<tr class="separator:aded7fc26c80df208a8926f58ecfe3485"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65ffe98c469f88123c8c638f88e4d4dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_rect.html">Rect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a65ffe98c469f88123c8c638f88e4d4dc">getClippingRect</a> ()</td></tr>
<tr class="memdesc:a65ffe98c469f88123c8c638f88e4d4dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets last clipping rectangle set using <a class="el" href="classfabgl_1_1_canvas_class.html#a4d08cd3532cf5fedb6bb6aa4ae8aca9a" title="Sets clipping rectangle relative to the origin. ">setClippingRect()</a>.  <a href="#a65ffe98c469f88123c8c638f88e4d4dc">More...</a><br /></td></tr>
<tr class="separator:a65ffe98c469f88123c8c638f88e4d4dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dd698668591341812e031b93ddff380"><td class="memItemLeft" align="right" valign="top">FontInfo const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a9dd698668591341812e031b93ddff380">getFontInfo</a> ()</td></tr>
<tr class="memdesc:a9dd698668591341812e031b93ddff380"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets info about currently selected font.  <a href="#a9dd698668591341812e031b93ddff380">More...</a><br /></td></tr>
<tr class="separator:a9dd698668591341812e031b93ddff380"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf1d0eae0cee9c7606b7a60c8f892ff5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#abf1d0eae0cee9c7606b7a60c8f892ff5">getHeight</a> ()</td></tr>
<tr class="memdesc:abf1d0eae0cee9c7606b7a60c8f892ff5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the canvas height in pixels.  <a href="#abf1d0eae0cee9c7606b7a60c8f892ff5">More...</a><br /></td></tr>
<tr class="separator:abf1d0eae0cee9c7606b7a60c8f892ff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f47771e01e4c6f787df6ae222c86aa9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_point.html">Point</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a8f47771e01e4c6f787df6ae222c86aa9">getOrigin</a> ()</td></tr>
<tr class="memdesc:a8f47771e01e4c6f787df6ae222c86aa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets last origin set using <a class="el" href="classfabgl_1_1_canvas_class.html#a1fecb8758eee5d174b72cc043d8c0019" title="Sets the axes origin. ">setOrigin()</a>.  <a href="#a8f47771e01e4c6f787df6ae222c86aa9">More...</a><br /></td></tr>
<tr class="separator:a8f47771e01e4c6f787df6ae222c86aa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a649e2ac335c509045503b764f2eb08c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a649e2ac335c509045503b764f2eb08c7">getPixel</a> (int X, int Y)</td></tr>
<tr class="memdesc:a649e2ac335c509045503b764f2eb08c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the pixel at specified position.  <a href="#a649e2ac335c509045503b764f2eb08c7">More...</a><br /></td></tr>
<tr class="separator:a649e2ac335c509045503b764f2eb08c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea413b9edfd1ba4d74289a7200bd2fe6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aea413b9edfd1ba4d74289a7200bd2fe6">getWidth</a> ()</td></tr>
<tr class="memdesc:aea413b9edfd1ba4d74289a7200bd2fe6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the canvas width in pixels.  <a href="#aea413b9edfd1ba4d74289a7200bd2fe6">More...</a><br /></td></tr>
<tr class="separator:aea413b9edfd1ba4d74289a7200bd2fe6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b2afd045850f543e19adde90128de2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a40b2afd045850f543e19adde90128de2">invertRectangle</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:a40b2afd045850f543e19adde90128de2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverts a rectangle.  <a href="#a40b2afd045850f543e19adde90128de2">More...</a><br /></td></tr>
<tr class="separator:a40b2afd045850f543e19adde90128de2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ff1750c3c1dec88ae623fc770aba4b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a8ff1750c3c1dec88ae623fc770aba4b3">invertRectangle</a> (<a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;rect)</td></tr>
<tr class="memdesc:a8ff1750c3c1dec88ae623fc770aba4b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverts a rectangle.  <a href="#a8ff1750c3c1dec88ae623fc770aba4b3">More...</a><br /></td></tr>
<tr class="separator:a8ff1750c3c1dec88ae623fc770aba4b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c40ff90362e04a56f8e96185a1cda02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a1c40ff90362e04a56f8e96185a1cda02">lineTo</a> (int X, int Y)</td></tr>
<tr class="memdesc:a1c40ff90362e04a56f8e96185a1cda02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a line starting from current pen position.  <a href="#a1c40ff90362e04a56f8e96185a1cda02">More...</a><br /></td></tr>
<tr class="separator:a1c40ff90362e04a56f8e96185a1cda02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90e9335db302e55fa8ad402338398b76"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a90e9335db302e55fa8ad402338398b76">moveTo</a> (int X, int Y)</td></tr>
<tr class="memdesc:a90e9335db302e55fa8ad402338398b76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves current pen position to the spcified coordinates.  <a href="#a90e9335db302e55fa8ad402338398b76">More...</a><br /></td></tr>
<tr class="separator:a90e9335db302e55fa8ad402338398b76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd3939a25da4985d225ef6d9f77ca7a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#abd3939a25da4985d225ef6d9f77ca7a8">resetGlyphOptions</a> ()</td></tr>
<tr class="memdesc:abd3939a25da4985d225ef6d9f77ca7a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets glyph options.  <a href="#abd3939a25da4985d225ef6d9f77ca7a8">More...</a><br /></td></tr>
<tr class="separator:abd3939a25da4985d225ef6d9f77ca7a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6d5cc3e4f24f75643041c28ec1ff768"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aa6d5cc3e4f24f75643041c28ec1ff768">resetPaintOptions</a> ()</td></tr>
<tr class="memdesc:aa6d5cc3e4f24f75643041c28ec1ff768"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets paint options.  <a href="#aa6d5cc3e4f24f75643041c28ec1ff768">More...</a><br /></td></tr>
<tr class="separator:aa6d5cc3e4f24f75643041c28ec1ff768"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62da2f323899243d0a02f2c199a31efb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a62da2f323899243d0a02f2c199a31efb">scroll</a> (int offsetX, int offsetY)</td></tr>
<tr class="memdesc:a62da2f323899243d0a02f2c199a31efb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scrolls pixels horizontally and/or vertically.  <a href="#a62da2f323899243d0a02f2c199a31efb">More...</a><br /></td></tr>
<tr class="separator:a62da2f323899243d0a02f2c199a31efb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec16bab7318419fde24db0b9a78d3281"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aec16bab7318419fde24db0b9a78d3281">selectFont</a> (FontInfo const *fontInfo)</td></tr>
<tr class="memdesc:aec16bab7318419fde24db0b9a78d3281"><td class="mdescLeft">&#160;</td><td class="mdescRight">Selects a font to use for the next text drawings.  <a href="#aec16bab7318419fde24db0b9a78d3281">More...</a><br /></td></tr>
<tr class="separator:aec16bab7318419fde24db0b9a78d3281"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cec8cd2eb3f498b67ec7f20800131da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a9cec8cd2eb3f498b67ec7f20800131da">setBrushColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:a9cec8cd2eb3f498b67ec7f20800131da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets brush (background) color specifying color components.  <a href="#a9cec8cd2eb3f498b67ec7f20800131da">More...</a><br /></td></tr>
<tr class="separator:a9cec8cd2eb3f498b67ec7f20800131da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3726026b12ae1caed627f43d15d112ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a3726026b12ae1caed627f43d15d112ef">setBrushColor</a> (<a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a> color)</td></tr>
<tr class="memdesc:a3726026b12ae1caed627f43d15d112ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets brush (background) color using a color name.  <a href="#a3726026b12ae1caed627f43d15d112ef">More...</a><br /></td></tr>
<tr class="separator:a3726026b12ae1caed627f43d15d112ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab06a16e91629b8fccd9f31f033784744"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ab06a16e91629b8fccd9f31f033784744">setBrushColor</a> (<a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;color)</td></tr>
<tr class="memdesc:ab06a16e91629b8fccd9f31f033784744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets brush (background) color specifying color components.  <a href="#ab06a16e91629b8fccd9f31f033784744">More...</a><br /></td></tr>
<tr class="separator:ab06a16e91629b8fccd9f31f033784744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d08cd3532cf5fedb6bb6aa4ae8aca9a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a4d08cd3532cf5fedb6bb6aa4ae8aca9a">setClippingRect</a> (<a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;rect)</td></tr>
<tr class="memdesc:a4d08cd3532cf5fedb6bb6aa4ae8aca9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets clipping rectangle relative to the origin.  <a href="#a4d08cd3532cf5fedb6bb6aa4ae8aca9a">More...</a><br /></td></tr>
<tr class="separator:a4d08cd3532cf5fedb6bb6aa4ae8aca9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e8cfc8e0e279de0defc88d8e01443dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc">setGlyphOptions</a> (<a class="el" href="unionfabgl_1_1_glyph_options.html">GlyphOptions</a> options)</td></tr>
<tr class="memdesc:a4e8cfc8e0e279de0defc88d8e01443dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets drawing options for the next glyphs.  <a href="#a4e8cfc8e0e279de0defc88d8e01443dc">More...</a><br /></td></tr>
<tr class="separator:a4e8cfc8e0e279de0defc88d8e01443dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fecb8758eee5d174b72cc043d8c0019"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a1fecb8758eee5d174b72cc043d8c0019">setOrigin</a> (int X, int Y)</td></tr>
<tr class="memdesc:a1fecb8758eee5d174b72cc043d8c0019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the axes origin.  <a href="#a1fecb8758eee5d174b72cc043d8c0019">More...</a><br /></td></tr>
<tr class="separator:a1fecb8758eee5d174b72cc043d8c0019"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75e528b6ebaf64cece2490b8cf585085"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a75e528b6ebaf64cece2490b8cf585085">setOrigin</a> (<a class="el" href="structfabgl_1_1_point.html">Point</a> const &amp;origin)</td></tr>
<tr class="memdesc:a75e528b6ebaf64cece2490b8cf585085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the axes origin.  <a href="#a75e528b6ebaf64cece2490b8cf585085">More...</a><br /></td></tr>
<tr class="separator:a75e528b6ebaf64cece2490b8cf585085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35673b908535f772ea1d1a6848c766a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a35673b908535f772ea1d1a6848c766a2">setPaintOptions</a> (<a class="el" href="structfabgl_1_1_paint_options.html">PaintOptions</a> options)</td></tr>
<tr class="memdesc:a35673b908535f772ea1d1a6848c766a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets paint options.  <a href="#a35673b908535f772ea1d1a6848c766a2">More...</a><br /></td></tr>
<tr class="separator:a35673b908535f772ea1d1a6848c766a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8dbddce234790b290cb4bd053dc0e701"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a8dbddce234790b290cb4bd053dc0e701">setPenColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:a8dbddce234790b290cb4bd053dc0e701"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pen (foreground) color specifying color components.  <a href="#a8dbddce234790b290cb4bd053dc0e701">More...</a><br /></td></tr>
<tr class="separator:a8dbddce234790b290cb4bd053dc0e701"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4360a87a09055ed6b7648f33aab8486"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ad4360a87a09055ed6b7648f33aab8486">setPenColor</a> (<a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a> color)</td></tr>
<tr class="memdesc:ad4360a87a09055ed6b7648f33aab8486"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pen (foreground) color using a color name.  <a href="#ad4360a87a09055ed6b7648f33aab8486">More...</a><br /></td></tr>
<tr class="separator:ad4360a87a09055ed6b7648f33aab8486"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6890d6855b440814cd08fca4e5a6d4ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a6890d6855b440814cd08fca4e5a6d4ec">setPenColor</a> (<a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;color)</td></tr>
<tr class="memdesc:a6890d6855b440814cd08fca4e5a6d4ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets pen (foreground) color specifying color components.  <a href="#a6890d6855b440814cd08fca4e5a6d4ec">More...</a><br /></td></tr>
<tr class="separator:a6890d6855b440814cd08fca4e5a6d4ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b0d0b0b79b816c9fd0d07a35dc0af99"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a3b0d0b0b79b816c9fd0d07a35dc0af99">setPixel</a> (int X, int Y)</td></tr>
<tr class="memdesc:a3b0d0b0b79b816c9fd0d07a35dc0af99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a single pixel with the pen color.  <a href="#a3b0d0b0b79b816c9fd0d07a35dc0af99">More...</a><br /></td></tr>
<tr class="separator:a3b0d0b0b79b816c9fd0d07a35dc0af99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafa6ed307409ffc23e6dbaa206c6d847"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aafa6ed307409ffc23e6dbaa206c6d847">setPixel</a> (int X, int Y, <a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;color)</td></tr>
<tr class="memdesc:aafa6ed307409ffc23e6dbaa206c6d847"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a single pixel with the specified color.  <a href="#aafa6ed307409ffc23e6dbaa206c6d847">More...</a><br /></td></tr>
<tr class="separator:aafa6ed307409ffc23e6dbaa206c6d847"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3021d86b04940331de5daa2b326da58"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ab3021d86b04940331de5daa2b326da58">setPixel</a> (<a class="el" href="structfabgl_1_1_point.html">Point</a> const &amp;pos, <a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;color)</td></tr>
<tr class="memdesc:ab3021d86b04940331de5daa2b326da58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a single pixel with the specified color.  <a href="#ab3021d86b04940331de5daa2b326da58">More...</a><br /></td></tr>
<tr class="separator:ab3021d86b04940331de5daa2b326da58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad26f012fc065dea1ac731013b824af6d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ad26f012fc065dea1ac731013b824af6d">setScrollingRegion</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:ad26f012fc065dea1ac731013b824af6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines the scrolling region.  <a href="#ad26f012fc065dea1ac731013b824af6d">More...</a><br /></td></tr>
<tr class="separator:ad26f012fc065dea1ac731013b824af6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a548e3986a6701b3794853bf738ef3093"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a548e3986a6701b3794853bf738ef3093">swapBuffers</a> ()</td></tr>
<tr class="memdesc:a548e3986a6701b3794853bf738ef3093"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps screen buffer when double buffering is enabled.  <a href="#a548e3986a6701b3794853bf738ef3093">More...</a><br /></td></tr>
<tr class="separator:a548e3986a6701b3794853bf738ef3093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23865421cc21cee94a22bb2289466f63"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a23865421cc21cee94a22bb2289466f63">swapRectangle</a> (int X1, int Y1, int X2, int Y2)</td></tr>
<tr class="memdesc:a23865421cc21cee94a22bb2289466f63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swaps pen and brush colors of the specified rectangle.  <a href="#a23865421cc21cee94a22bb2289466f63">More...</a><br /></td></tr>
<tr class="separator:a23865421cc21cee94a22bb2289466f63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86e33b9fedf29a2d06a74377088ed645"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a86e33b9fedf29a2d06a74377088ed645">textExtent</a> (FontInfo const *fontInfo, char const *text)</td></tr>
<tr class="memdesc:a86e33b9fedf29a2d06a74377088ed645"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates text extension in pixels.  <a href="#a86e33b9fedf29a2d06a74377088ed645">More...</a><br /></td></tr>
<tr class="separator:a86e33b9fedf29a2d06a74377088ed645"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f922900e46395ef17e56d8f7289b6d2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a6f922900e46395ef17e56d8f7289b6d2">textExtent</a> (char const *text)</td></tr>
<tr class="memdesc:a6f922900e46395ef17e56d8f7289b6d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates text extension in pixels.  <a href="#a6f922900e46395ef17e56d8f7289b6d2">More...</a><br /></td></tr>
<tr class="separator:a6f922900e46395ef17e56d8f7289b6d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f55393ab2f38be5779fd8651979cca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#ad2f55393ab2f38be5779fd8651979cca">waitCompletion</a> (bool waitVSync=true)</td></tr>
<tr class="memdesc:ad2f55393ab2f38be5779fd8651979cca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for drawing queue to become empty.  <a href="#ad2f55393ab2f38be5779fd8651979cca">More...</a><br /></td></tr>
<tr class="separator:ad2f55393ab2f38be5779fd8651979cca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aae47e5f03e69ed21dd07f4b73e43e4f0"><td class="memItemLeft" align="right" valign="top">static FontInfo const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#aae47e5f03e69ed21dd07f4b73e43e4f0">getPresetFontInfo</a> (int columns, int rows)</td></tr>
<tr class="memdesc:aae47e5f03e69ed21dd07f4b73e43e4f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the font info that best fits the specified number of columns and rows.  <a href="#aae47e5f03e69ed21dd07f4b73e43e4f0">More...</a><br /></td></tr>
<tr class="separator:aae47e5f03e69ed21dd07f4b73e43e4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ad927fd74aea835b15425fc4312361d"><td class="memItemLeft" align="right" valign="top">static FontInfo const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_canvas_class.html#a4ad927fd74aea835b15425fc4312361d">getPresetFontInfoFromHeight</a> (int height, bool fixedWidth)</td></tr>
<tr class="memdesc:a4ad927fd74aea835b15425fc4312361d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the font info that best fits the specified height.  <a href="#a4ad927fd74aea835b15425fc4312361d">More...</a><br /></td></tr>
<tr class="separator:a4ad927fd74aea835b15425fc4312361d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class with a set of drawing methods. </p>
<p>This class interfaces directly to the VGA controller and provides a set of primitives to paint lines, circles, etc. and to scroll regions, copy rectangles and draw glyphs.<br />
 For default origin is at the top left, starting from (0, 0) up to (Canvas Width - 1, Canvas Height - 1).</p>
<p>Example: </p><pre class="fragment">// Setup pins and resolution (5 GPIOs hence we have up to 8 colors)
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5);
VGAController.setResolution(VGA_640x350_70Hz);

// Paint a green rectangle with red border
Canvas.setPenColor(Color::BrightRed);
Canvas.setBrushColor(Color::BrightGreen);
Canvas.fillRectangle(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);
Canvas.drawRectangle(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a37beec4d52526d2710d47d911a1cd8c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37beec4d52526d2710d47d911a1cd8c2">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the entire canvas with the brush color. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_collision_detection_2_collision_detection_8ino-example.html#a4">CollisionDetection/CollisionDetection.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a40">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a14">MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a2">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a10">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aa68c2ce56287c24807735d8581896ae6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa68c2ce56287c24807735d8581896ae6">&#9670;&nbsp;</a></span>copyRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::copyRect </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sourceX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>sourceY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>destX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>destY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copies a screen rectangle to the specified position. </p>
<p>Source and destination rectangles can overlap. The copy is performed pixel by pixel and it is a slow operation.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sourceX</td><td>Left source rectangle horizontal position. </td></tr>
    <tr><td class="paramname">sourceY</td><td>Top source rectangle vertical position. </td></tr>
    <tr><td class="paramname">destX</td><td>Left destination rectangle horizontal position. </td></tr>
    <tr><td class="paramname">destY</td><td>Top destination rectangle vertical position. </td></tr>
    <tr><td class="paramname">width</td><td>Rectangle horizontal size. </td></tr>
    <tr><td class="paramname">height</td><td>Rectangle vertical size. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a087f09897a081655285878a7990897fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a087f09897a081655285878a7990897fa">&#9670;&nbsp;</a></span>drawBitmap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawBitmap </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_bitmap.html">Bitmap</a> const *&#160;</td>
          <td class="paramname"><em>bitmap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a bitmap at specified position. </p>
<p>A bitmap is an rectangular image with one byte per pixel. Each pixel has up to 64 colors (2 bits per channel) and can have 4 level of transparency. At the moment only level 0 (full transparent) and level 3 (full opaque) is supported.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal position of bitmap left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of bitmap top side. </td></tr>
    <tr><td class="paramname">bitmap</td><td>Pointer to bitmap structure. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_collision_detection_2_collision_detection_8ino-example.html#a8">CollisionDetection/CollisionDetection.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a11">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a5c98e6b07d359ecb53ad42ce3b2dfc4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c98e6b07d359ecb53ad42ce3b2dfc4d">&#9670;&nbsp;</a></span>drawChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawChar </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a character at specified position. </p>
<p><a class="el" href="classfabgl_1_1_canvas_class.html#a5c98e6b07d359ecb53ad42ce3b2dfc4d" title="Draws a character at specified position. ">drawChar()</a> uses currently selected font (<a class="el" href="classfabgl_1_1_canvas_class.html#aec16bab7318419fde24db0b9a78d3281" title="Selects a font to use for the next text drawings. ">selectFont()</a> method) and currently selected glyph options (<a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc" title="Sets drawing options for the next glyphs. ">setGlyphOptions()</a> method).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal position of character left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of character top side. </td></tr>
    <tr><td class="paramname">c</td><td>Character to draw (an index in the character font glyphs set).</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Draw a 'C' at position 100, 100
Canvas.drawChar(100, 100, 'C');</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a15">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aeb55df87239430d3d88cd17ff10740b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb55df87239430d3d88cd17ff10740b3">&#9670;&nbsp;</a></span>drawEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawEllipse </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws an ellipse specifying center and size, using current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow ellipse
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawEllipse(100, 100, 40, 40);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_simple_terminal_out_2_simple_terminal_out_8ino-example.html#a10">SimpleTerminalOut/SimpleTerminalOut.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a0358b5407c1158532728a9006d81e101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0358b5407c1158532728a9006d81e101">&#9670;&nbsp;</a></span>drawGlyph()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawGlyph </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a glyph at specified position. </p>
<p>A <a class="el" href="structfabgl_1_1_glyph.html" title="Represents a glyph position, size and binary data. ">Glyph</a> is a monochrome bitmap (1 bit per pixel) that can be painted using pen (foreground) and brush (background) colors.<br />
 Various drawing options can be set using <a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc" title="Sets drawing options for the next glyphs. ">CanvasClass.setGlyphOptions()</a> method.<br />
 Glyphs are used by <a class="el" href="classfabgl_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> to render characters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">width</td><td>Horizontal size of the glyph. </td></tr>
    <tr><td class="paramname">height</td><td>Vertical size of the glyph. </td></tr>
    <tr><td class="paramname">data</td><td>Memory buffer containing the glyph. Each line is byte aligned. The size must be "(width + 7) / 8 * height" (integer division!). </td></tr>
    <tr><td class="paramname">index</td><td>Optional index inside data. Use when the buffer contains multiple glyphs.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// draw an 'A' using the predefined font to fit 80x25 screen text
Canvas.setPenColor(Color::BrightGreen);
const fabgl::FontInfo * f = Canvas.getPresetFontInfo(80, 25);
Canvas.drawGlyph(0, 0, f-&gt;width, f-&gt;height, f-&gt;data, 0x41);

// draw a 12x8 sprite
const uint8_t enemy[] = {
  0x0f, 0x00, 0x7f, 0xe0, 0xff, 0xf0, 0xe6, 0x70, 0xff,
  0xf0, 0x39, 0xc0, 0x66, 0x60, 0x30, 0xc0,
};
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawGlyph(50, 80, 12, 8, enemy);</pre> 
</div>
</div>
<a id="afdb202eb5ce3c1789a51f2d322ffe87d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdb202eb5ce3c1789a51f2d322ffe87d">&#9670;&nbsp;</a></span>drawLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawLine </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a line specifying initial and ending coordinates. </p>
<p>The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Starting horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Starting vertical coordinate. </td></tr>
    <tr><td class="paramname">X2</td><td>Ending horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Ending vertical coordinate.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a blue X over the whole canvas
Canvas.setPenColor(Color::BrightBlue);
Canvas.drawLine(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);
Canvas.drawLine(Canvas.getWidth() - 1, 0, 0, Canvas.getHeight() - 1);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_simple_terminal_out_2_simple_terminal_out_8ino-example.html#a8">SimpleTerminalOut/SimpleTerminalOut.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a25">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="ae571dee57606116e6866cd9d87431255"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae571dee57606116e6866cd9d87431255">&#9670;&nbsp;</a></span>drawPath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawPath </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_point.html">Point</a> const *&#160;</td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pointsCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a sequence of lines. </p>
<p>Because the path is drawn on VSync (vertical retracing) the provided array of points must survive until the path is completely painted.<br />
 To avoid it, application can disable drawing on vsync (calling <a class="el" href="classfabgl_1_1_v_g_a_controller_class.html#a7e0814c52bfc5eecd93fbb5ebce8d423" title="Enables or disables drawings inside vertical retracing time. ">VGAControllerClass.enableBackgroundPrimitiveExecution()</a>) or just wait until all the drawing have been completed(calling <a class="el" href="classfabgl_1_1_canvas_class.html#ad2f55393ab2f38be5779fd8651979cca" title="Waits for drawing queue to become empty. ">CanvasClass.waitCompletion()</a>).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>A pointer to an array of <a class="el" href="structfabgl_1_1_point.html" title="Represents the coordinate of a point. ">Point</a> objects. </td></tr>
    <tr><td class="paramname">pointsCount</td><td>Number of points in the array.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">Point points[3] = { {10, 10}, {20, 10}, {15, 20} };
Canvas.setPenColor(Color::Red);
Canvas.drawPath(points, 3);
Canvas.waitCompletion();</pre> 
</div>
</div>
<a id="ae3c576f40f28789d5b11e622e2c1021c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3c576f40f28789d5b11e622e2c1021c">&#9670;&nbsp;</a></span>drawRectangle() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawRectangle </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a rectangle using the current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow rectangle
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawRectangle(10, 10, 100, 100);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a42">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_simple_terminal_out_2_simple_terminal_out_8ino-example.html#a9">SimpleTerminalOut/SimpleTerminalOut.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a30">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aa8c5651bc5a45fbdccd484b1430f16c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8c5651bc5a45fbdccd484b1430f16c5">&#9670;&nbsp;</a></span>drawRectangle() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawRectangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a rectangle using the current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Rectangle coordinates. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7e53c87e27387e1849e9439880d03e44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e53c87e27387e1849e9439880d03e44">&#9670;&nbsp;</a></span>drawText() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawText </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wrap</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a string at specified position. </p>
<p><a class="el" href="classfabgl_1_1_canvas_class.html#a7e53c87e27387e1849e9439880d03e44" title="Draws a string at specified position. ">drawText()</a> uses currently selected font (<a class="el" href="classfabgl_1_1_canvas_class.html#aec16bab7318419fde24db0b9a78d3281" title="Selects a font to use for the next text drawings. ">selectFont()</a> method) and currently selected glyph options (<a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc" title="Sets drawing options for the next glyphs. ">setGlyphOptions()</a> method).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal position of first character left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of first character top side. </td></tr>
    <tr><td class="paramname">text</td><td>String to draw (indexes in the character font glyphs set). </td></tr>
    <tr><td class="paramname">wrap</td><td>If true text is wrapped at the end of line.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Draw a 'Hello World!' at position 100, 100
Canvas.drawText(100, 100, "Hellow World!");</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a48">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a8">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a3">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a156b6cdb13bbd65d298805512d710197"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a156b6cdb13bbd65d298805512d710197">&#9670;&nbsp;</a></span>drawText() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawText </td>
          <td>(</td>
          <td class="paramtype">FontInfo const *&#160;</td>
          <td class="paramname"><em>fontInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wrap</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a string at specified position. </p>
<p><a class="el" href="classfabgl_1_1_canvas_class.html#a7e53c87e27387e1849e9439880d03e44" title="Draws a string at specified position. ">drawText()</a> uses the specified font and currently selected glyph options (<a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc" title="Sets drawing options for the next glyphs. ">setGlyphOptions()</a> method).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fontInfo</td><td>Pointer to font structure containing font info and glyphs data. </td></tr>
    <tr><td class="paramname">X</td><td>Horizontal position of first character left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of first character top side. </td></tr>
    <tr><td class="paramname">text</td><td>String to draw (indexes in the character font glyphs set). </td></tr>
    <tr><td class="paramname">wrap</td><td>If true text is wrapped at the end of line.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Draw a 'Hello World!' at position 100, 100
Canvas.drawText(&amp;FONT_8x8, 100, 100, "Hellow World!");</pre> 
</div>
</div>
<a id="a45b0f278e677b6195ccea7bc377fe8c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45b0f278e677b6195ccea7bc377fe8c5">&#9670;&nbsp;</a></span>drawTextFmt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawTextFmt </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws formatted text at specified position. </p>
<p><a class="el" href="classfabgl_1_1_canvas_class.html#a45b0f278e677b6195ccea7bc377fe8c5" title="Draws formatted text at specified position. ">drawTextFmt()</a> uses currently selected font (<a class="el" href="classfabgl_1_1_canvas_class.html#aec16bab7318419fde24db0b9a78d3281" title="Selects a font to use for the next text drawings. ">selectFont()</a> method) and currently selected glyph options (<a class="el" href="classfabgl_1_1_canvas_class.html#a4e8cfc8e0e279de0defc88d8e01443dc" title="Sets drawing options for the next glyphs. ">setGlyphOptions()</a> method).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal position of first character left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of first character top side. </td></tr>
    <tr><td class="paramname">format</td><td>Format specifier like printf.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">Canvas.drawTextFmt(100, 100, "Free DMA memory: %d", heap_caps_get_free_size(MALLOC_CAP_DMA));</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a10">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a50">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a4">MouseOnScreen/MouseOnScreen.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a26">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a46a911ad5ad3fee9a091e660939cb86c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46a911ad5ad3fee9a091e660939cb86c">&#9670;&nbsp;</a></span>drawTextWithEllipsis()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::drawTextWithEllipsis </td>
          <td>(</td>
          <td class="paramtype">FontInfo const *&#160;</td>
          <td class="paramname"><em>fontInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxX</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a string at specified position. Add ellipses before truncation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fontInfo</td><td>Pointer to font structure containing font info and glyphs data. </td></tr>
    <tr><td class="paramname">X</td><td>Horizontal position of first character left side. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical position of first character top side. </td></tr>
    <tr><td class="paramname">text</td><td>String to draw (indexes in the character font glyphs set). </td></tr>
    <tr><td class="paramname">maxX</td><td>Maximum horizontal coordinate allowed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aeeaccac47e099a8b20fae352b9f6766b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeeaccac47e099a8b20fae352b9f6766b">&#9670;&nbsp;</a></span>fillEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::fillEllipse </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills an ellipse specifying center and size, using current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow ellipse
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillEllipse(100, 100, 40, 40);

// Paint a yellow ellipse with blue border
Canvas.setPenColor(Color::BrightBlue);
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillEllipse(100, 100, 40, 40);
Canvas.drawEllipse(100, 100, 40, 40);</pre> 
</div>
</div>
<a id="ac74e3c84ed8ec93165b937a7188fca3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac74e3c84ed8ec93165b937a7188fca3e">&#9670;&nbsp;</a></span>fillPath()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::fillPath </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_point.html">Point</a> const *&#160;</td>
          <td class="paramname"><em>points</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pointsCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills the polygon enclosed in a sequence of lines. </p>
<p>Because the path is drawn on VSync (vertical retracing) the provided array of points must survive until the path is completely painted.<br />
 To avoid it, application can disable drawing on vsync (calling <a class="el" href="classfabgl_1_1_v_g_a_controller_class.html#a7e0814c52bfc5eecd93fbb5ebce8d423" title="Enables or disables drawings inside vertical retracing time. ">VGAControllerClass.enableBackgroundPrimitiveExecution()</a>) or just wait until all the drawing have been completed(calling <a class="el" href="classfabgl_1_1_canvas_class.html#ad2f55393ab2f38be5779fd8651979cca" title="Waits for drawing queue to become empty. ">CanvasClass.waitCompletion()</a>).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">points</td><td>A pointer to an array of <a class="el" href="structfabgl_1_1_point.html" title="Represents the coordinate of a point. ">Point</a> objects. </td></tr>
    <tr><td class="paramname">pointsCount</td><td>Number of points in the array.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">Point points[3] = { {10, 10}, {20, 10}, {15, 20} };
Canvas.setBrushColor(Color::Red);
Canvas.fillPath(points, 3);
Canvas.waitCompletion();</pre> 
</div>
</div>
<a id="a003aeb0b8e58b5e0e658e2f18c106fef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a003aeb0b8e58b5e0e658e2f18c106fef">&#9670;&nbsp;</a></span>fillRectangle() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::fillRectangle </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a rectangle using the current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow rectangle
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillRectangle(10, 10, 100, 100);

// Paint a yellow rectangle with blue border
Canvas.setPenColor(Color::BrightBlue);
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillRectangle(10, 10, 100, 100);
Canvas.drawRectangle(10, 10, 100, 100);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a41">ModelineStudio/ModelineStudio.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a29">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aded7fc26c80df208a8926f58ecfe3485"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aded7fc26c80df208a8926f58ecfe3485">&#9670;&nbsp;</a></span>fillRectangle() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::fillRectangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a rectangle using the current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Rectangle coordinates.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow rectangle
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillRectangle(Rect(10, 10, 100, 100));</pre> 
</div>
</div>
<a id="a65ffe98c469f88123c8c638f88e4d4dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65ffe98c469f88123c8c638f88e4d4dc">&#9670;&nbsp;</a></span>getClippingRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfabgl_1_1_rect.html">Rect</a> fabgl::CanvasClass::getClippingRect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets last clipping rectangle set using <a class="el" href="classfabgl_1_1_canvas_class.html#a4d08cd3532cf5fedb6bb6aa4ae8aca9a" title="Sets clipping rectangle relative to the origin. ">setClippingRect()</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>Last clipping rectangle set. </dd></dl>

</div>
</div>
<a id="a9dd698668591341812e031b93ddff380"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dd698668591341812e031b93ddff380">&#9670;&nbsp;</a></span>getFontInfo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FontInfo const* fabgl::CanvasClass::getFontInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets info about currently selected font. </p>
<dl class="section return"><dt>Returns</dt><dd>FontInfo structure representing font info and data. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a13">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="abf1d0eae0cee9c7606b7a60c8f892ff5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf1d0eae0cee9c7606b7a60c8f892ff5">&#9670;&nbsp;</a></span>getHeight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::CanvasClass::getHeight </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the canvas height in pixels. </p>
<p>This is equivalent to VGA Controller viewport height.</p>
<dl class="section return"><dt>Returns</dt><dd>The canvas height in pixels. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_ansi_terminal_2_ansi_terminal_8ino-example.html#a10">AnsiTerminal/AnsiTerminal.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a35">ModelineStudio/ModelineStudio.ino</a>, and <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a11">MouseOnScreen/MouseOnScreen.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a8f47771e01e4c6f787df6ae222c86aa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f47771e01e4c6f787df6ae222c86aa9">&#9670;&nbsp;</a></span>getOrigin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfabgl_1_1_point.html">Point</a> fabgl::CanvasClass::getOrigin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets last origin set using <a class="el" href="classfabgl_1_1_canvas_class.html#a1fecb8758eee5d174b72cc043d8c0019" title="Sets the axes origin. ">setOrigin()</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>Last origin set. </dd></dl>

</div>
</div>
<a id="a649e2ac335c509045503b764f2eb08c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a649e2ac335c509045503b764f2eb08c7">&#9670;&nbsp;</a></span>getPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> fabgl::CanvasClass::getPixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the pixel at specified position. </p>
<p>Screen reading may occur while other drawings are in progress, so the result may be not updated. To avoid it, call <a class="el" href="classfabgl_1_1_canvas_class.html#a649e2ac335c509045503b764f2eb08c7" title="Reads the pixel at specified position. ">getPixel()</a> after <a class="el" href="classfabgl_1_1_canvas_class.html#ad2f55393ab2f38be5779fd8651979cca" title="Waits for drawing queue to become empty. ">waitCompletion()</a> or disable background drawings.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pixel color as <a class="el" href="structfabgl_1_1_r_g_b.html" title="Represents an RGB color. ">RGB</a> structure. </dd></dl>

</div>
</div>
<a id="aae47e5f03e69ed21dd07f4b73e43e4f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae47e5f03e69ed21dd07f4b73e43e4f0">&#9670;&nbsp;</a></span>getPresetFontInfo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FontInfo const  * fabgl::CanvasClass::getPresetFontInfo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>columns</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the font info that best fits the specified number of columns and rows. </p>
<p>This method returns only fixed width fonts.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">columns</td><td>Minimum number of required columns. </td></tr>
    <tr><td class="paramname">rows</td><td>Minimum number of required rows.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The font info found. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a4">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a46">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a16">MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a5">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a20">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a4ad927fd74aea835b15425fc4312361d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ad927fd74aea835b15425fc4312361d">&#9670;&nbsp;</a></span>getPresetFontInfoFromHeight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FontInfo const  * fabgl::CanvasClass::getPresetFontInfoFromHeight </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>fixedWidth</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets the font info that best fits the specified height. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">height</td><td>Required font height in pixels. </td></tr>
    <tr><td class="paramname">fixedWidth</td><td>If True returns only fixed width fonts, if False returns only variable width fonts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The font info found. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_audio_2_audio_8ino-example.html#a5">Audio/Audio.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a1">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aea413b9edfd1ba4d74289a7200bd2fe6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea413b9edfd1ba4d74289a7200bd2fe6">&#9670;&nbsp;</a></span>getWidth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::CanvasClass::getWidth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines the canvas width in pixels. </p>
<p>This is equivalent to VGA Controller viewport width.</p>
<dl class="section return"><dt>Returns</dt><dd>The canvas width in pixels. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_ansi_terminal_2_ansi_terminal_8ino-example.html#a9">AnsiTerminal/AnsiTerminal.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a34">ModelineStudio/ModelineStudio.ino</a>, and <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a10">MouseOnScreen/MouseOnScreen.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a40b2afd045850f543e19adde90128de2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40b2afd045850f543e19adde90128de2">&#9670;&nbsp;</a></span>invertRectangle() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::invertRectangle </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inverts a rectangle. </p>
<p>The Not logic operator is applied to pixels inside the rectangle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8ff1750c3c1dec88ae623fc770aba4b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ff1750c3c1dec88ae623fc770aba4b3">&#9670;&nbsp;</a></span>invertRectangle() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::invertRectangle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inverts a rectangle. </p>
<p>The Not logic operator is applied to pixels inside the rectangle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Rectangle coordinates. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1c40ff90362e04a56f8e96185a1cda02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c40ff90362e04a56f8e96185a1cda02">&#9670;&nbsp;</a></span>lineTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::lineTo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draws a line starting from current pen position. </p>
<p>Starting pen position is specified using <a class="el" href="classfabgl_1_1_canvas_class.html#a90e9335db302e55fa8ad402338398b76" title="Moves current pen position to the spcified coordinates. ">CanvasClass.moveTo()</a> method or from ending position of the last call to <a class="el" href="classfabgl_1_1_canvas_class.html#a1c40ff90362e04a56f8e96185a1cda02" title="Draws a line starting from current pen position. ">CanvasClass.lineTo()</a>.<br />
 The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal ending line position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical ending line position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint white a triangle
Canvas.setPenColor(Color::BrightWhite);
Canvas.moveTo(10, 12);
Canvas.lineTo(30, 40);
Canvas.lineTo(10, 12);</pre> 
</div>
</div>
<a id="a90e9335db302e55fa8ad402338398b76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90e9335db302e55fa8ad402338398b76">&#9670;&nbsp;</a></span>moveTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::moveTo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Moves current pen position to the spcified coordinates. </p>
<p>Some methods expect initial pen position to be specified, like Canvas.lineTo().</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pen position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pen position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a triangle
Canvas.moveTo(10, 12);
Canvas.lineTo(30, 40);
Canvas.lineTo(10, 12);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a22">MouseOnScreen/MouseOnScreen.ino</a>.</dd>
</dl>
</div>
</div>
<a id="abd3939a25da4985d225ef6d9f77ca7a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd3939a25da4985d225ef6d9f77ca7a8">&#9670;&nbsp;</a></span>resetGlyphOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::resetGlyphOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets glyph options. </p>

</div>
</div>
<a id="aa6d5cc3e4f24f75643041c28ec1ff768"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6d5cc3e4f24f75643041c28ec1ff768">&#9670;&nbsp;</a></span>resetPaintOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::resetPaintOptions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets paint options. </p>

</div>
</div>
<a id="a62da2f323899243d0a02f2c199a31efb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62da2f323899243d0a02f2c199a31efb">&#9670;&nbsp;</a></span>scroll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::scroll </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scrolls pixels horizontally and/or vertically. </p>
<p>Scrolling occurs inside the scrolling region defined by <a class="el" href="classfabgl_1_1_canvas_class.html#ad26f012fc065dea1ac731013b824af6d" title="Defines the scrolling region. ">CanvasClass.setScrollingRegion()</a>.<br />
 Vertical scroll is done moving line pointers, so it is very fast to perform.<br />
 Horizontal scroll is done moving pixel by pixel (CPU intensive task).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>Number of pixels to scroll left (offsetX &lt; 0) or right (offsetX &gt; 0). </td></tr>
    <tr><td class="paramname">offsetY</td><td>Number of pixels to scroll up (offsetY &lt; 0) or down (offsetY &gt; 0). </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a12">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aec16bab7318419fde24db0b9a78d3281"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec16bab7318419fde24db0b9a78d3281">&#9670;&nbsp;</a></span>selectFont()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::selectFont </td>
          <td>(</td>
          <td class="paramtype">FontInfo const *&#160;</td>
          <td class="paramname"><em>fontInfo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Selects a font to use for the next text drawings. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fontInfo</td><td>Pointer to font structure containing font info and glyphs data.</td></tr>
  </table>
  </dd>
</dl>
<p>Examples: </p><pre class="fragment">// Set a font for about 40x14 text screen
Canvas.selectFont(Canvas.getPresetFontInfo(40, 14));

// Set the 8x8 predefined font (FONT_8x8 defined in font_8x8.h)
Canvas.selectFont(&amp;FONT_8x8);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a3">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a45">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a15">MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a4">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a0">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a9cec8cd2eb3f498b67ec7f20800131da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cec8cd2eb3f498b67ec7f20800131da">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets brush (background) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set blue brush with 8 colors setup
Canvas.setBrushColor(0, 0, 1);

// Set blue brush with 64 colors setup
Canvas.setBrushColor(0, 0, 3);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_collision_detection_2_collision_detection_8ino-example.html#a2">CollisionDetection/CollisionDetection.ino</a>, <a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a8">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a38">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a2">MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a0">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a9">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a3726026b12ae1caed627f43d15d112ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3726026b12ae1caed627f43d15d112ef">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets brush (background) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>The color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set blue brush
 Canvas.setBrushColor(Color::BrightBlue);</pre> 
</div>
</div>
<a id="ab06a16e91629b8fccd9f31f033784744"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab06a16e91629b8fccd9f31f033784744">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets brush (background) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>The color <a class="el" href="structfabgl_1_1_r_g_b.html" title="Represents an RGB color. ">RGB</a> components.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set blue brush
 Canvas.setBrushColor(RGB(0, 0, 3);</pre> 
</div>
</div>
<a id="a4d08cd3532cf5fedb6bb6aa4ae8aca9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d08cd3532cf5fedb6bb6aa4ae8aca9a">&#9670;&nbsp;</a></span>setClippingRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setClippingRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_rect.html">Rect</a> const &amp;&#160;</td>
          <td class="paramname"><em>rect</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets clipping rectangle relative to the origin. </p>
<p>The default clipping rectangle covers the entire canvas area.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rect</td><td>Clipping rectangle relative to the origin. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4e8cfc8e0e279de0defc88d8e01443dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e8cfc8e0e279de0defc88d8e01443dc">&#9670;&nbsp;</a></span>setGlyphOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setGlyphOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="unionfabgl_1_1_glyph_options.html">GlyphOptions</a>&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets drawing options for the next glyphs. </p>
<p>Setting glyph options allows to slightly change how a glyph is rendered, applying effects like Bold, Italic, Inversion, double width or height and so on.<br />
 Because <a class="el" href="classfabgl_1_1_canvas_class.html" title="A class with a set of drawing methods. ">CanvasClass</a> draws text using glyphs these options affects also how text is rendered.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>A bit field to specify multiple options</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Draw "Hello World!"
Canvas.setGlyphOptions(GlyphOptions().FillBackground(true).DoubleWidth(1));
Canvas.drawText(20, 20, "Hello World!");</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a5">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a47">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a17">MouseOnScreen/MouseOnScreen.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a3">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a1fecb8758eee5d174b72cc043d8c0019"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fecb8758eee5d174b72cc043d8c0019">&#9670;&nbsp;</a></span>setOrigin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setOrigin </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the axes origin. </p>
<p>Setting axes origin will translate every coordinate by the specified value (expect for sprites).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal translation (0 = no translation). </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical translation (0 = no translation). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a75e528b6ebaf64cece2490b8cf585085"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75e528b6ebaf64cece2490b8cf585085">&#9670;&nbsp;</a></span>setOrigin() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setOrigin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_point.html">Point</a> const &amp;&#160;</td>
          <td class="paramname"><em>origin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the axes origin. </p>
<p>Setting axes origin will translate every coordinate by the specified value (expect for sprites).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">origin</td><td>Origin coordinates. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a35673b908535f772ea1d1a6848c766a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35673b908535f772ea1d1a6848c766a2">&#9670;&nbsp;</a></span>setPaintOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPaintOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_paint_options.html">PaintOptions</a>&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets paint options. </p>

</div>
</div>
<a id="a8dbddce234790b290cb4bd053dc0e701"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dbddce234790b290cb4bd053dc0e701">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets pen (foreground) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set white pen with 8 colors setup
Canvas.setPenColor(1, 1, 1);

// Set white pen with 64 colors setup
Canvas.setPenColor(3, 3, 3);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_collision_detection_2_collision_detection_8ino-example.html#a5">CollisionDetection/CollisionDetection.ino</a>, <a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a6">DoubleBuffer/DoubleBuffer.ino</a>, <a class="el" href="_modeline_studio_2_modeline_studio_8ino-example.html#a36">ModelineStudio/ModelineStudio.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a0">MouseOnScreen/MouseOnScreen.ino</a>, <a class="el" href="_simple_terminal_out_2_simple_terminal_out_8ino-example.html#a6">SimpleTerminalOut/SimpleTerminalOut.ino</a>, <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a6">SpaceInvaders/SpaceInvaders.ino</a>, and <a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a2">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<a id="ad4360a87a09055ed6b7648f33aab8486"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4360a87a09055ed6b7648f33aab8486">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___enumerations.html#ga843f6f6094fb6666d0e726d7b0e06f3b">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets pen (foreground) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set white pen
 Canvas.setPenColor(Color::BrightWhite);</pre> 
</div>
</div>
<a id="a6890d6855b440814cd08fca4e5a6d4ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6890d6855b440814cd08fca4e5a6d4ec">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets pen (foreground) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color <a class="el" href="structfabgl_1_1_r_g_b.html" title="Represents an RGB color. ">RGB</a> components.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set white pen
 Canvas.setPenColor(RGB(3, 3, 3));</pre> 
</div>
</div>
<a id="a3b0d0b0b79b816c9fd0d07a35dc0af99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b0d0b0b79b816c9fd0d07a35dc0af99">&#9670;&nbsp;</a></span>setPixel() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a single pixel with the pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pixel position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pixel position. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_collision_detection_2_collision_detection_8ino-example.html#a7">CollisionDetection/CollisionDetection.ino</a>, <a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a21">MouseOnScreen/MouseOnScreen.ino</a>, and <a class="el" href="_simple_terminal_out_2_simple_terminal_out_8ino-example.html#a7">SimpleTerminalOut/SimpleTerminalOut.ino</a>.</dd>
</dl>
</div>
</div>
<a id="aafa6ed307409ffc23e6dbaa206c6d847"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aafa6ed307409ffc23e6dbaa206c6d847">&#9670;&nbsp;</a></span>setPixel() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPixel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a single pixel with the specified color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pixel position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pixel position. </td></tr>
    <tr><td class="paramname">color</td><td>Pixe color. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab3021d86b04940331de5daa2b326da58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3021d86b04940331de5daa2b326da58">&#9670;&nbsp;</a></span>setPixel() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setPixel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_point.html">Point</a> const &amp;&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_r_g_b.html">RGB</a> const &amp;&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fills a single pixel with the specified color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pos</td><td>Pixel position. </td></tr>
    <tr><td class="paramname">color</td><td>Pixe color. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad26f012fc065dea1ac731013b824af6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad26f012fc065dea1ac731013b824af6d">&#9670;&nbsp;</a></span>setScrollingRegion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::setScrollingRegion </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Defines the scrolling region. </p>
<p>A scrolling region is the rectangle area where <a class="el" href="classfabgl_1_1_canvas_class.html#a62da2f323899243d0a02f2c199a31efb" title="Scrolls pixels horizontally and/or vertically. ">CanvasClass.scroll()</a> method can operate.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a548e3986a6701b3794853bf738ef3093"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a548e3986a6701b3794853bf738ef3093">&#9670;&nbsp;</a></span>swapBuffers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::swapBuffers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swaps screen buffer when double buffering is enabled. </p>
<p>Double buffering is enabled calling VGAController.setResolution() with doubleBuffered = true.<br />
 Buffers swap is always executed in vertical retracing (at VSync pulse). </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_double_buffer_2_double_buffer_8ino-example.html#a11">DoubleBuffer/DoubleBuffer.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a23865421cc21cee94a22bb2289466f63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23865421cc21cee94a22bb2289466f63">&#9670;&nbsp;</a></span>swapRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::swapRectangle </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swaps pen and brush colors of the specified rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a86e33b9fedf29a2d06a74377088ed645"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86e33b9fedf29a2d06a74377088ed645">&#9670;&nbsp;</a></span>textExtent() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::CanvasClass::textExtent </td>
          <td>(</td>
          <td class="paramtype">FontInfo const *&#160;</td>
          <td class="paramname"><em>fontInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates text extension in pixels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fontInfo</td><td>Pointer to font structure containing font info and glyphs data. </td></tr>
    <tr><td class="paramname">text</td><td>String to calculate length (indexes in the character font glyphs set). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6f922900e46395ef17e56d8f7289b6d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f922900e46395ef17e56d8f7289b6d2">&#9670;&nbsp;</a></span>textExtent() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::CanvasClass::textExtent </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates text extension in pixels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">text</td><td>String to calculate length (indexes in the character font glyphs set). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad2f55393ab2f38be5779fd8651979cca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2f55393ab2f38be5779fd8651979cca">&#9670;&nbsp;</a></span>waitCompletion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::CanvasClass::waitCompletion </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>waitVSync</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for drawing queue to become empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">waitVSync</td><td>If true drawings are done on vertical retracing (slow), if false drawings are perfomed immediately (fast with flickering). </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_v_i_c20_2_v_i_c20_8ino-example.html#a21">VIC20/VIC20.ino</a>.</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="canvas_8h_source.html">canvas.h</a></li>
<li>canvas.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_canvas_class.html">CanvasClass</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
